﻿/***********************************************************************
 * <copyright file="DbOptionPresenter.cs" company="BUCA JSC">
 * -->    Copyright (C) statement. All right reserved
 * </copyright>
 * 
 * Created:   ThangND
 * Email:    thangnd@buca.vn
 * Website:
 * Create Date: 26 March 2014
 * Usage: 
 * 
 * RevisionHistory: 
 * Date         Author               Description 
 * 
 * ************************************************************************/

using System.Collections.Generic;
using WindowsForms.AOnline.Model.BusinessObjects.Dictionary;
using WindowsForms.AOnline.View.Dictionary;
using WindowsForms.AOnline.Presenter;
using WindowsForms.AOnline.View.Dictionary;
using WindowsForms.AOnline.View.Dictionary;


namespace WindowsForms.AOnline.Presenter.Dictionary.DbOption
{
    /// <summary>
    /// DbOptionPresenter
    /// </summary>
    public class DbOptionPresenter : Presenter<IDBOptionView>
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="DbOptionPresenter"/> class.
        /// </summary>
        /// <param name="view">The view.</param>
        public DbOptionPresenter(IDBOptionView view)
            : base(view)
        {
        }

        ///// <summary>
        ///// Displays the specified dbOption identifier.
        ///// </summary>
        ///// <param name="dbOptionId">The dbOption identifier.</param>
        //public void Display(string dbOptionId)
        //{
        //    if (dbOptionId == null) { return; }

        //    var dbOption = Model.GetDbOption(dbOptionId);

        //    View.OptionId = dbOption.OptionId;
        //    View.Value = dbOption.OptionValue;
        //    View.ValueType = dbOption.ValueType;
        //    View.IsSystem = dbOption.IsSystem;
        //    View.Description = dbOption.Description;
        //}

        /// <summary>
        /// Saves this instance.
        /// </summary>
        /// <returns></returns>
        //public string Save()
        //{
        //    var listdbOption = new List< DbOptionModel> 
        //    {
        //        OptionId = View.OptionId,
        //     //   OptionValue = View.OptionValue,
        //        ValueType = View.ValueType,
        //        IsSystem = View.IsSystem,
        //        Description = View.Description,
        //    };

        //    return Model.UpdateDbOption( dbOption);
        //}
    }
}
